<?php

namespace App\Exceptions;

use Symfony\Component\HttpKernel\Exception\HttpException;

class ApiException extends HttpException
{
    protected $extra;

    public function __construct(string $message = null, ?int $code = 0, array $extra = [])
    {
        parent::__construct(500, $message, null, [], $code);
        $this->extra = $extra;
    }

    public function getExtra()
    {
        return $this->extra;
    }
}